import { openBuildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
    //获取左侧组织树
    getOrganizationTree: {
        url: '/adminc/v1/organization_manage/o_org/get_obs_tree',
        method: 'get'
    },
    // 新增子单位
    createChildUnit: {
        url: '/adminc/v1/organization_manage/o_org/create_obs',
        method: 'post'
    },
    // 修改子单位
    updateChildUnit: {
        url: '/adminc/v1/organization_manage/o_org/update_org',
        method: 'put'
    },
    // 删除子单位
    deleteChildUnit: {
        url: '/adminc/v1/organization_manage/o_org/delete_org',
        method: 'delete'
    },
    //获取部门类型
    getDepList: {
        url: '/adminc/v1/config_manage/b_code/get_code_list',
        method: 'get'
    },
    // 新增部门
    createDepartment: {
        url: '/adminc/v1/organization_manage/o_org/create_obs',
        method: 'post'
    },
    // 修改部门
    updateDepartment: {
        url: '/adminc/v1/organization_manage/o_dept/update_dept',
        method: 'put'
    },
    // 删除部门
    deleteDepartment: {
        url: '/adminc/v1/organization_manage/o_dept/delete_dept',
        method: 'delete'
    },
    // 业务领域,管理职能等详情
    detailJob: {
        url: '/adminc/v2/o_job_v2/get_job_info',
        method: 'get'
    },
    // 新增岗位
    createJob: {
        url: '/adminc/v1/organization_manage/o_org/create_obs',
        method: 'post'
    },
    // 修改岗位
    updateJob: {
        url: '/adminc/v1/organization_manage/o_job/update_job',
        method: 'put'
    },
    // 删除岗位
    deleteJob: {
        url: '/adminc/v1/organization_manage/o_job/delete_job',
        method: 'delete'
    },
    // 岗位-权限清单-列表
    getJobPermissionList: {
        url: '/adminc/v1/organization_manage/p_auth_job_rela/get_auth_job_rela_list',
        method: 'get'
    },
    // 岗位-权限清单-列表(新)
    getJobList: {
        url: '/adminc/v2/o_job_v2/get_job_object_list',
        method: 'get'
    },
    // 岗位-权限清单-轻应用列表
    getLightappList: {
        url: '/adminc/v2/o_job_v2/get_job_app_list',
        method: 'get'
    },
    // 岗位-权限模板-列表-删除
    deleteTempJobPermission: {
        url: '/adminc/v1/organization_manage/p_auth_job_rela/delete_auth_job_rela',
        method: 'delete'
    },
    // 岗位-权限清单-列表-删除(新)
    deleteJobPermission: {
        url: '/adminc/v2/o_job_v2/job_remove_object',
        method: 'delete'
    },
    // 岗位-轻应用列表-删除
    deleteAppList: {
        url: '/adminc/v2/o_job_v2/job_remove_app',
        method: 'delete'
    },
    // 获取人员列表
    getJobUserList: {
        url: '/adminc/v1/organization_manage/p_job_user/get_job_user_list',
        method: 'get'
    },
    // 人员列表-删除
    deleteJobUser: {
        url: '/adminc/v1/organization_manage/p_job_user/delete_job_user',
        method: 'delete'
    },
    // 获取分配人员列表
    getAssignUserList: {
        url: '/adminc/v1/system_manage/p_sys_user/get_account_list',
        method: 'get'
    },
    // 保存分配人员
    batchAssignUser: {
        url: '/adminc/v1/organization_manage/p_job_user/batch_create_job_user',
        method: 'post'
    },
    // 分配权限模板-列表
    getAssignTemplateList: {
        // url: '/adminc/v1/resource_manage/p_auth_template/get_auth_template_list',
        url: '/adminc/v1/resource_manage/p_auth_template/get_auth_template_list_by_user',
        method: 'get'
    },
    // 分配权限模板-保存
    saveAssignTemplate: {
        url: '/adminc/v1/organization_manage/p_auth_job_rela/batch_create_auth_job_rela',
        method: 'post'
    },
    // 分配权限-保存
    saveAssignPermission: {
        url: '/adminc/v2/o_job_v2/distribute_object',
        method: 'post'
    },
    // 分配权限模板-列表-权限项列表
    getTemplatePermissionList: {
        url: '/adminc/v1/resource_manage/p_auth_object_rela/get_auth_object_rela_list',
        method: 'get'
    },
    // 获取公司列表
    getCompanyList: {
        url: '/adminc/v1/organization_manage/o_company/get_company_list',
        method: 'get'
    },
    // 获取公司类型列表
    getCompanyTypeList: {
        url: '/adminc/v1/config_manage/b_code/get_code_list',
        method: 'get'
    },
    //设置管理员
    setAdmin: {
        url: '/adminc/v2/o_org_v2/set_manager',
        method: 'put'
    },
}
export default openBuildService(settings)